import request from '@/utils/request'
import API from './constants'

/**
 * 查找所有分类
 */
const findHot = () => request({
  url: API.SEARCH_API,
  method: 'GET'
})

const findList = keyword => request({
  url: '/api/search.html?pageIndex=1&keyword=' + keyword,
  method: 'GET'
})

export { // 两个函数作为一个整体导出
  findHot,
  findList
}
